package com.kaifamiao.schema;

import org.springframework.aop.AfterReturningAdvice;

import java.lang.reflect.Method;

// AfterReturningAdvice 继承了 org.springframework.aop.AfterAdvice 接口
// org.springframework.aop.AfterAdvice 继承了 org.aopalliance.aop.Advice
public class PandaAfterAdvice implements AfterReturningAdvice {

    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        String name = method.getName();
        System.out.println( "【" + name + "】方法返回【" + returnValue + "】" );
    }

}
